﻿using System;
using System.Web.Mvc;

namespace Limestone.Fields
{
    [Serializable]
    public class TextField : Field, IField
    {
        [AllowHtml]
        public string Text { get; set; }
        public new TextFieldSetting Settings
        {
            get { return base.Settings as TextFieldSetting; }
            set { base.Settings = value; }
        }

        public TextField()
            : base(FieldType.TextField, "")
        {
            Text = "";
        }

        public TextField(string name)
            : base(FieldType.TextField, name)
        {
        }

        public override string GetHtml()
        {
            return Text;
        }
    }
}